package com.ymatou.iapi.godfreightmgr.service;

import java.util.ArrayList;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.ymatou.iapi.godmch.parameter.AgentInfo;
import com.ymt.base.YmatouBaseCall;
import com.ymttest.database.model.godfreight.CollectiongoodsAddress;
import com.ymttest.utils.EnvSetup;
/**
*自提点详情
*FreeMaker Template自动生成代码
*/
public class GetCollectionGoodsAddressInfoCall extends YmatouBaseCall{
	private static String opurl ="api/address/GetCollectionGoodsAddressInfo";
	
	public GetCollectionGoodsAddressInfoCall() {
		super(EnvSetup.getSystemUrl("godfreightmgr_ipai"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	public CollectiongoodsAddress getCollectiongoodsAddress() {
		CollectiongoodsAddress result =new CollectiongoodsAddress();
		try {
			result = (CollectiongoodsAddress) new Gson().fromJson(getJsonObject().get("data").toString(), new TypeToken<CollectiongoodsAddress>() {}.getType());
		} catch (Exception e) {
			e.printStackTrace();
		}
		return result;
	}
}